package com.hualude.roadsign.service;

import com.hualude.roadsign.dto.*;
import com.hualude.roadsign.model.UserPushTimeEntity;

import java.util.List;

public interface UserService {

    /**
     * @Description: 用户登录验证与返回信息封装
     * @Author feng
     * @Date 2017/2/24 10:05
     */
    public UserDto loginCheck(String loginName, String loginPwd, String inputCode) throws Exception;

    /**
     * @Description: 根据Id获取教师信息
     * @Author: SN
     * @Date: 2017/2/20 23:45
     */
    public UserDto getUserById(Integer userId) throws Exception;

    /**
     * @Description: 根据Id更新教师部分信息
     * @Author: SN
     * @Date: 2017/2/20 23:45
     */
    public Integer updateUserById(UserDto teacherDto) throws Exception;

    public Integer updatePwdById(String oldPwd, String newPwd, Integer userId) throws Exception;

    public Integer sendMQ(String phone, String code, String userName) throws Exception;

    /**
     * @Author: PJN
     * @Description: 获取用户信息4公告
     * @Data: 21:48:2017/3/5
     * @params: []
     **/
    public List<UserDto> getUser4addNotice() throws Exception;

    /**
     * @Description: 根据登录名获取验证码
     * @Author feng
     * @Date 2017/3/10 11:30
     */
    public String getVerificationCodeByLoginName(String loginName) throws Exception;

    /**
     * @Description: 检验验证码
     * @Author feng
     * @Date 2017/3/10 18:25
     */
    public String checkVerificationCodeByLoginName(String loginName, int verificationCode) throws Exception;

    /**
     * @Description: 根据登录名重置密码
     * @Author feng
     * @Date 2017/3/11 11:44
     */
    public String updatePwdByLoginName(String newPwd, String loginName) throws Exception;

    /**
     * @Description: 根据用户Id获取用户身份
     * @Author feng
     * @Date 2017/3/11 11:44
     */
    public String getActorNameByUserId(Integer userId) throws Exception;

    /**
     * @Description: 更新用户信息移动端
     * @Author: feng
     * @Date: 2017/3/14 20:44
     */
    public Integer updateUserById4app(Integer userId, String userIcon, String userName, String userSex, String userEmail) throws Exception;


    /**
     * @Description: 获取user
     * @Author: zhou_zheng
     * @Date: 2017/3/28 18:50
     */
    public DTResponseDto getUser4DT(DTRequestDto dtRequestDto, Integer orgId, Integer actorId) throws Exception;

    /**
     * @Description: userState=1启用 =0停用  用户
     * @Author: xu-jiaHui
     * @Date: 2017/4/20 19:30
     */
    public Integer deactivateUserById(String userIds, Integer userState) throws Exception;

    //添加信息
    public Integer addUser(UserDto userDto) throws Exception;

    /**
     * @Description: 通过userId更新用户信息
     * @Author: xu-jiaHui
     * @Date: 2017/4/10 19:51
     */

    public Integer updateUserByUserId(UserDto userDto) throws Exception;

    /**
     * @Description: 通过loginName获取数量
     * @Author: xu-jiaHui
     * @Date: 2017/4/10 19:52
     */
    public Integer getCountByLoginName(String loginName) throws Exception;

    /**
     * @Description: 获取角色列表（不包括系统管理员和主管管理员）
     * @Author: xu-jiaHui
     * @Date: 2017/4/28 1:34
     */
    public List<ActorDto> getActor4Select() throws Exception;

    /**
     * @Description: 删除用户
     * @Author: xu-jiaHui
     * @Date: 2017/5/1 0:03
     */
    public Integer deleteUserById(Integer userId) throws Exception;

    /**
     * @Description: 重置密码666666
     * @Author: xu-jiaHui
     * @Date: 2017/5/1 21:44
     */
    public Integer resetPswByUserId(Integer userId) throws Exception;


    /**
     * @Description: 获取用户的上次推送截止时间
     * @author xu_jiaHui
     * @date 2018/4/12
     */
    public UserPushTimeEntity getPushTimeByUserId(Integer userId) throws Exception;

    /**
     * @Description: 更新查看推送时间 type：1.....
     * @uthor xu_jiaHui
     * @date 2018/4/12
     */
    public UserPushTimeEntity updatePushTimeByUserId(UserPushTimeDto userPushTimeDto) throws Exception;

    /**
     * @Description: 通过orgId，userId获取角标信息
     * @author xu_jiaHui
     * @date 2018/4/13
     */
    public List<CornerDto> getConner4App(Integer orgId, Integer userId) throws Exception;

    /**
     * @Description: 根据类型更新访问时间
     * @author xu_jiaHui
     * @date 2018/4/13
     */
    public Integer updatePushTimeByType(Integer userId, Integer type) throws Exception;

    /**
     * @Description: 通过类型获取当前未读消息
     * @uthor xu_jiaHui
     * @date 2018/4/13
     */
    public List<AlarmPushDto> getCurrentPushList(Integer orgId, Integer deviceType, Integer userId,String newTime, Integer mCount, Integer mSize) throws Exception;
}
